package com.tony.second.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * create by xuxia on 2024/1/29 14:10
 */
@Component
@Configuration
@ConfigurationProperties(prefix = "test")
@PropertySource("classpath:test.properties")//自定义配置文件
public class CeShiConfigBean {
    private String name;
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
